#!/bin/sh
# SPDX-License-Identifier: GPL-2.0
# description: Generic dynamic event - Repeating add/remove fprobe events
# requires: dynamic_events "f[:[<group>/][<event>]] <func-name>[%return] [<args>]":README

echo 0 > events/enable
echo > dynamic_events

PLACE=$FUNCTION_FORK
REPEAT_TIMES=64

for i in `seq 1 $REPEAT_TIMES`; do
  echo "f:myevent $PLACE" >> dynamic_events
  grep -q myevent dynamic_events
  test -d events/fprobes/myevent
  echo > dynamic_events
done

clear_trace
